package com.wobangkj.common.repository;

import com.wobangkj.common.model.crud.Tag;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;
import java.util.Map;

public interface TagRepository extends JpaRepository<Tag, Long> {


    @Query(nativeQuery = true, value="select * from  tag  where id in :idsStr ")
    List<Map> list(StringBuffer idsStr);

    @Query(nativeQuery = true, value="select * from  tag  where id =:idsStr ")
    List<Map> selectByTestint(String idsStr);

    @Query(nativeQuery = true, value="select * from  tag  where tag_name like CONCAT('%',:tag_name,'%') ")
    List<Tag> findByNameLike(String tag_name);

}
